package org.footballmanager.pandafootball.system.service;

import org.footballmanager.pandafootball.system.domain.FootLottery;
import org.footballmanager.pandafootball.system.domain.FootUser;
import org.footballmanager.pandafootball.system.form.impl.FootLotterySearchForm;
import org.springframework.ui.Model;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

public interface FootLotteryService extends BaseService<FootLottery> {
	/**
	 * 重新计算白人碎片抽取时间
	 * @param userId
	 * @param isPay
	 * @return
	 */
	String reComputeWhiteDate(Long userId, boolean isPay, HttpServletRequest request);
	
	/**
	 * 重新计算普通球星碎片抽取时间
	 * @param userId
	 * @param isPay
	 * @return
	 */
	String reComputeGreenDate(Long userId, boolean isPay, HttpServletRequest request);
	
	/**
	 * 重新计算洲际球星碎片抽取时间
	 * @param userId
	 * @param isPay
	 * @return
	 */
	String reComputeBlueDate(Long userId, boolean isPay, HttpServletRequest request);
	
	/**
	 * 重新计算超级球星碎片抽取时间
	 * @param userId
	 * @param isPay
	 * @return
	 */
	String reComputePurpleDate(Long userId, boolean isPay, HttpServletRequest request);
	
	/**
	 * 重新计算顶级球星碎片抽取时间
	 * @param userId
	 * @param isPay
	 * @return
	 */
	String reComputeOrangeDate(Long userId, boolean isPay, HttpServletRequest request);
	
	/**
	 * 根据用户主键查找碎片时间数据
	 * @param userId
	 * @return
	 */
	FootLottery findLotteryByUserId(Long userId);

	/**
	 * 新建用户的碎片时间信息
	 * @param user
	 */
	void saveNewLottery(FootUser user, HttpServletRequest request);

    /**
     * 翻页方法
     * @param footLotterySearchForm 条件
     * @return 列表
     */
    List<FootLottery> findall(FootLotterySearchForm footLotterySearchForm);

    /**
     * 查询
     * @param entityname 实体类名
     * @param map 参数
     * @param footLotterySearchForm 条件
     */
    void search(String entityname, Model map, FootLotterySearchForm footLotterySearchForm);
}
